package com.chaokang.controller;

import com.chaokang.dao.entity.AdministratorEntity;
import com.chaokang.service.AdministratorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

@RestController
public class AdministratorController {
    @Autowired
    private AdministratorService administratorService;

    @PostMapping(value = "/service/getAdminById",produces = MediaType.APPLICATION_JSON_VALUE)
    public AdministratorEntity getAdminById(@RequestBody AdministratorEntity administratorEntity){
        return administratorService.getAdminById(administratorEntity.getId());
    }
}
